package com.woniuxy.edubureau.serviceimpl;

import com.woniuxy.commons.entity.SchoolInfo;
import com.woniuxy.edubureau.dao.SchoolMapper;
import com.woniuxy.edubureau.service.SchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: luojiwei
 * @date: 2020/7/17 10:21
 * @description: 创建学校的业务
 */
@Service
public class SchoolServiceImpl implements SchoolService {
    @Autowired
    private SchoolMapper schoolMapper;
    @Override
    public int createSchoolInfo(SchoolInfo schoolInfo) {
        return schoolMapper.createSchoolInfo(schoolInfo);
    }

    @Override
    public Integer getMaxId() {
        return schoolMapper.getMaxId();
    }

    @Override
    public String getSnumber(Integer maxid) {
        return schoolMapper.getSnumber(maxid);
    }

    @Override
    public List<SchoolInfo> getAll(int p,int limit) {
        return schoolMapper.getAll(p,limit);
    }

    @Override
    public Long getDataNums() {
        return schoolMapper.getDataNums();
    }

    @Override
    public String getBySid(int sid) {
        return schoolMapper.getBySid(sid);
    }

    @Override
    public List<SchoolInfo> getAllSchoolInfos() {
        return schoolMapper.getAllSchoolInfos();
    }
}
